﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Management;
using System.Text;

namespace WMI.NET.CIM
{
    /// <summary>
    /// The CIM_Keyboard class represents the capabilities and management of the keyboard logical device.
    /// </summary>
    public class  CIM_Keyboard :  CIM_UserDevice
    {

        private string _Layout;
        private Nullable<UInt16> _NumberOfFunctionKeys;
        private Nullable<UInt16> _Password;

        /// <summary>
        /// Free-form string that indicates the format and layout of the keyboard.
        /// </summary>
        public string Layout { get { return _Layout; } }

        /// <summary>
        /// Number of function keys on the keyboard.
        /// </summary>
        public Nullable<UInt16> NumberOfFunctionKeys { get { return _NumberOfFunctionKeys; } }

        /// <summary>
        /// Integer that indicates whether a hardware-level password is enabled on the keyboard to prevent local input. 
        /// </summary>
        public Nullable<UInt16> Password { get { return _Password; } } //TODO enum

        /// <summary>
        /// 
        /// </summary>
        /// <param name="mbo"></param>
        public CIM_Keyboard(ManagementBaseObject mbo)
            : base(mbo)
        {
            _Layout = mbo.GetStringValue("Layout");
            _NumberOfFunctionKeys = mbo.GetUshortValue("NumberOfFunctionKeys");
            _Password = mbo.GetUshortValue("Password");
        }

    }
}
